#include<stdio.h>
void main()
{
    int num;
    float discount,income;
    printf("buying number:");
    scanf("%d",&num);
    switch (num/100){
        case 0 :discount = 1;break;
        case 1 :discount = 0.9;break;
        case 2 :discount = 0.85;break;
        case 3 :
        case 4 :discount = 0.82;break;
        default:discount = 0.8;break;
    }
    income = 800*discount*num;
    printf("%.0f\n",income);
}